3.3.85 \(\int \frac {(a+\frac {b}{x})^n x^2}{c+d x} \, dx\) [285]

3.3.85.1 Optimal result
3.3.85.2 Mathematica [A] (verified)
3.3.85.3 Rubi [A] (verified)
3.3.85.4 Maple [F]
3.3.85.5 Fricas [F]
3.3.85.6 Sympy [F]
3.3.85.7 Maxima [F]
3.3.85.8 Giac [F]
3.3.85.9 Mupad [F(-1)]

3.3.85.1 Optimal result

Integrand size = 20, antiderivative size = 195 \[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=-\frac {(2 a c+b d (1-n)) \left (a+\frac {b}{x}\right )^{1+n} x}{2 a^2 d^2}+\frac {\left (a+\frac {b}{x}\right )^{1+n} x^2}{2 a d}-\frac {c^3 \left (a+\frac {b}{x}\right )^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )}{d^3 (a c-b d) (1+n)}+\frac {\left (2 a^2 c^2-2 a b c d n-b^2 d^2 (1-n) n\right ) \left (a+\frac {b}{x}\right )^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b}{a x}\right )}{2 a^3 d^3 (1+n)} \]

output
-1/2*(2*a*c+b*d*(1-n))*(a+b/x)^(1+n)*x/a^2/d^2+1/2*(a+b/x)^(1+n)*x^2/a/d-c 
^3*(a+b/x)^(1+n)*hypergeom([1, 1+n],[2+n],c*(a+b/x)/(a*c-b*d))/d^3/(a*c-b* 
d)/(1+n)+1/2*(2*a^2*c^2-2*a*b*c*d*n-b^2*d^2*(1-n)*n)*(a+b/x)^(1+n)*hyperge 
om([1, 1+n],[2+n],1+b/a/x)/a^3/d^3/(1+n)
 
3.3.85.2 Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.81 \[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\frac {\left (a+\frac {b}{x}\right )^n (b+a x) \left (-2 a^3 c^3 \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )+(a c-b d) \left (a d (1+n) x (b d (-1+n)+a (-2 c+d x))+\left (2 a^2 c^2-2 a b c d n+b^2 d^2 (-1+n) n\right ) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b}{a x}\right )\right )\right )}{2 a^3 d^3 (a c-b d) (1+n) x} \]

input
Integrate[((a + b/x)^n*x^2)/(c + d*x),x]
 
output
((a + b/x)^n*(b + a*x)*(-2*a^3*c^3*Hypergeometric2F1[1, 1 + n, 2 + n, (c*( 
a + b/x))/(a*c - b*d)] + (a*c - b*d)*(a*d*(1 + n)*x*(b*d*(-1 + n) + a*(-2* 
c + d*x)) + (2*a^2*c^2 - 2*a*b*c*d*n + b^2*d^2*(-1 + n)*n)*Hypergeometric2 
F1[1, 1 + n, 2 + n, 1 + b/(a*x)])))/(2*a^3*d^3*(a*c - b*d)*(1 + n)*x)
 
3.3.85.3 Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.10, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {1016, 948, 114, 168, 174, 75, 78}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^2 \left (a+\frac {b}{x}\right )^n}{c+d x} \, dx\)

\(\Big \downarrow \) 1016

\(\displaystyle \int \frac {x \left (a+\frac {b}{x}\right )^n}{\frac {c}{x}+d}dx\)

\(\Big \downarrow \) 948

\(\displaystyle -\int \frac {\left (a+\frac {b}{x}\right )^n x^3}{\frac {c}{x}+d}d\frac {1}{x}\)

\(\Big \downarrow \) 114

\(\displaystyle \frac {\int \frac {\left (a+\frac {b}{x}\right )^n \left (2 a c+\frac {b (1-n) c}{x}+b d (1-n)\right ) x^2}{\frac {c}{x}+d}d\frac {1}{x}}{2 a d}+\frac {x^2 \left (a+\frac {b}{x}\right )^{n+1}}{2 a d}\)

\(\Big \downarrow \) 168

\(\displaystyle \frac {-\frac {\int \frac {\left (a+\frac {b}{x}\right )^n \left (2 a^2 c^2-2 a b d n c-\frac {b (2 a c+b d (1-n)) n c}{x}-b^2 d^2 (1-n) n\right ) x}{\frac {c}{x}+d}d\frac {1}{x}}{a d}-\frac {x \left (a+\frac {b}{x}\right )^{n+1} (2 a c+b d (1-n))}{a d}}{2 a d}+\frac {x^2 \left (a+\frac {b}{x}\right )^{n+1}}{2 a d}\)

\(\Big \downarrow \) 174

\(\displaystyle \frac {-\frac {\frac {\left (2 a^2 c^2-2 a b c d n-b^2 d^2 (1-n) n\right ) \int \left (a+\frac {b}{x}\right )^n xd\frac {1}{x}}{d}-\frac {2 a^2 c^3 \int \frac {\left (a+\frac {b}{x}\right )^n}{\frac {c}{x}+d}d\frac {1}{x}}{d}}{a d}-\frac {x \left (a+\frac {b}{x}\right )^{n+1} (2 a c+b d (1-n))}{a d}}{2 a d}+\frac {x^2 \left (a+\frac {b}{x}\right )^{n+1}}{2 a d}\)

\(\Big \downarrow \) 75

\(\displaystyle \frac {-\frac {-\frac {2 a^2 c^3 \int \frac {\left (a+\frac {b}{x}\right )^n}{\frac {c}{x}+d}d\frac {1}{x}}{d}-\frac {\left (a+\frac {b}{x}\right )^{n+1} \left (2 a^2 c^2-2 a b c d n-b^2 d^2 (1-n) n\right ) \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b}{a x}+1\right )}{a d (n+1)}}{a d}-\frac {x \left (a+\frac {b}{x}\right )^{n+1} (2 a c+b d (1-n))}{a d}}{2 a d}+\frac {x^2 \left (a+\frac {b}{x}\right )^{n+1}}{2 a d}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {-\frac {\frac {2 a^2 c^3 \left (a+\frac {b}{x}\right )^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {c \left (a+\frac {b}{x}\right )}{a c-b d}\right )}{d (n+1) (a c-b d)}-\frac {\left (a+\frac {b}{x}\right )^{n+1} \left (2 a^2 c^2-2 a b c d n-b^2 d^2 (1-n) n\right ) \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b}{a x}+1\right )}{a d (n+1)}}{a d}-\frac {x \left (a+\frac {b}{x}\right )^{n+1} (2 a c+b d (1-n))}{a d}}{2 a d}+\frac {x^2 \left (a+\frac {b}{x}\right )^{n+1}}{2 a d}\)

input
Int[((a + b/x)^n*x^2)/(c + d*x),x]
 
output
((a + b/x)^(1 + n)*x^2)/(2*a*d) + (-(((2*a*c + b*d*(1 - n))*(a + b/x)^(1 + 
 n)*x)/(a*d)) - ((2*a^2*c^3*(a + b/x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 
2 + n, (c*(a + b/x))/(a*c - b*d)])/(d*(a*c - b*d)*(1 + n)) - ((2*a^2*c^2 - 
 2*a*b*c*d*n - b^2*d^2*(1 - n)*n)*(a + b/x)^(1 + n)*Hypergeometric2F1[1, 1 
 + n, 2 + n, 1 + b/(a*x)])/(a*d*(1 + n)))/(a*d))/(2*a*d)
 

3.3.85.3.1 Defintions of rubi rules used

rule 75
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x 
)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + 
 d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (IntegerQ[m] 
 || GtQ[-d/(b*c), 0])
 

rule 78
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b 
*c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m 
 + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] 
 &&  !IntegerQ[m] && IntegerQ[n]
 

rule 114
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[b*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1 
)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e 
 - a*f))   Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) 
 - b*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], 
 x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] && (IntegerQ[n] || 
 IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])
 

rule 168
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + 
 d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + S 
imp[1/((m + 1)*(b*c - a*d)*(b*e - a*f))   Int[(a + b*x)^(m + 1)*(c + d*x)^n 
*(e + f*x)^p*Simp[(a*d*f*g - b*(d*e + c*f)*g + b*c*e*h)*(m + 1) - (b*g - a* 
h)*(d*e*(n + 1) + c*f*(p + 1)) - d*f*(b*g - a*h)*(m + n + p + 3)*x, x], x], 
 x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && ILtQ[m, -1]
 

rule 174
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* 
((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d)   Int[(e + f*x)^ 
p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d)   Int[(e + f*x)^p/(c + d 
*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
 

rule 948
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^ 
p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ 
[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]
 

rule 1016
Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^( 
p_.), x_Symbol] :> Int[x^(m - n*q)*(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ 
[{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] ||  !I 
ntegerQ[p])
 
3.3.85.4 Maple [F]

\[\int \frac {\left (a +\frac {b}{x}\right )^{n} x^{2}}{d x +c}d x\]

input
int((a+b/x)^n*x^2/(d*x+c),x)
 
output
int((a+b/x)^n*x^2/(d*x+c),x)
 
3.3.85.5 Fricas [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n} x^{2}}{d x + c} \,d x } \]

input
integrate((a+b/x)^n*x^2/(d*x+c),x, algorithm="fricas")
 
output
integral(x^2*((a*x + b)/x)^n/(d*x + c), x)
 
3.3.85.6 Sympy [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\int \frac {x^{2} \left (a + \frac {b}{x}\right )^{n}}{c + d x}\, dx \]

input
integrate((a+b/x)**n*x**2/(d*x+c),x)
 
output
Integral(x**2*(a + b/x)**n/(c + d*x), x)
 
3.3.85.7 Maxima [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n} x^{2}}{d x + c} \,d x } \]

input
integrate((a+b/x)^n*x^2/(d*x+c),x, algorithm="maxima")
 
output
integrate((a + b/x)^n*x^2/(d*x + c), x)
 
3.3.85.8 Giac [F]

\[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\int { \frac {{\left (a + \frac {b}{x}\right )}^{n} x^{2}}{d x + c} \,d x } \]

input
integrate((a+b/x)^n*x^2/(d*x+c),x, algorithm="giac")
 
output
integrate((a + b/x)^n*x^2/(d*x + c), x)
 
3.3.85.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+\frac {b}{x}\right )^n x^2}{c+d x} \, dx=\int \frac {x^2\,{\left (a+\frac {b}{x}\right )}^n}{c+d\,x} \,d x \]

input
int((x^2*(a + b/x)^n)/(c + d*x),x)
 
output
int((x^2*(a + b/x)^n)/(c + d*x), x)